package cn.edu.cdu.farmdeal.controller;

import cn.edu.cdu.farmdeal.service.SwiperService;
import cn.edu.cdu.farmdeal.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: tupeng
 * @Date: 2020/3/12
 **/
@Controller
public class SwiperController {
    private final SwiperService swiperService;

    public SwiperController(SwiperService swiperService) {
        this.swiperService = swiperService;
    }

    @GetMapping("/swiper/getSwiper")
    @ResponseBody
    public R getSwiper(){
        return R.ok("请求成功").put("data",swiperService.getSwiper());
    }

}
